<?php
namespace Pinenut;

class Log {
	static protected $_timeStack = array();
	static function begin() {
		static::$_timeStack[] = microtime(true);
	}
	static function end($title, $data = null) {
		$time = array_pop(static::$_timeStack);
		$class = \Application::$LogClass;
		$class::commit($time, microtime(true), $title, $data);
	}
	
	static function msg($title, $data = null) {
		$class = \Application::$LogClass;
		$class::commit(microtime(true), microtime(true), $title, $data);
	}
}